import request from '@/utils/request'


// 登录

export const  checkLogin = (data)=>{
    return request({
        method:'post',
        url:'/users/checkLogin',
        data    
    })
}

// 添加账号

export const  addAccount = (data)=>{
    return request({
        method:'post',
        url:'/users/add',
        data
    })
}

// 获取账号列表
export const  getAccountList = (params)=>{
    return request({
        method:'get',
        url:'/users/list',
       params
    })
}


//删除账号

export const  delAccount = (params)=>{
    return request({
        method:'get',
        url:'/users/del',
       params
    })

}

// 修改账号

export const  editAccount = (data)=>{
    return request({
        method:'post',
        url:'/users/edit',
        data
    })
}

// 批量删除账号

export const  batchDelete = (params)=>{
    return request({
        method:'get',
        url:'/users/batchdel',
       params
    })
}

// 检测原密码是否正确
export const  validateOldPwd = ()=>{}
// 确认新密码
export const   updatePwd = ()=>{}
// 个人信息
export const  getUserInfo = ()=>{

    return request({
        method:'get',
        url:'/users/info',
       
    })
}

// 修改用户头像
export const  updateUserImg = (params)=>{
    return request({
        method:'get',
        url:'/users/avataredit',
        params
    })
}
